org.eclipse.vtp.framework.interactions.core.support
Class Widget

java.lang.Object
  extended by org.eclipse.vtp.framework.interactions.core.support.Widget
Direct Known Subclasses:
Action, Choice, Dialog, Else, ElseIf, EventHandler, Filled, FormElement, Grammar, If, Iota, Option, Output, Parameter, PropertiesSupport, Rule, Script, Variable, WidgetDocument

public abstract class Widget
extends java.lang.Object

Base class for component-style document constructs.

Version:
2.0
Author:
Trip Gilman, Lonnie Pryor

Constructor Summary
protected Widget()
          Creates a new Widget.
 
Method Summary
 java.lang.String toString()
           
protected  void writeAttribute(org.xml.sax.helpers.AttributesImpl attributes, java.lang.String uri, java.lang.String localName, java.lang.String name, java.lang.String type, java.lang.String value)
          Writes an attribute member of this widget to the supplied set.
protected  void writeChildren(org.xml.sax.ContentHandler outputHandler, java.util.Collection children)
          Writes the specified collection of Widgets to the supplied output handler.
protected  void writeChildren(org.xml.sax.ContentHandler outputHandler, Widget[] children)
          Writes the specified array of Widgets to the supplied output handler.
abstract  void writeWidget(org.xml.sax.ContentHandler outputHandler)
          Writes the content of this widget to an XML content handler.
 void writeWidget(java.io.OutputStream outputStream)
          Writes the content of this widget to a stream.
 void writeWidget(java.io.Writer writer)
          Writes the content of this widget to a stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Widget

protected Widget()
Creates a new Widget.

Method Detail

writeWidget

public abstract void writeWidget(org.xml.sax.ContentHandler outputHandler)
                          throws java.lang.NullPointerException,
                                 org.xml.sax.SAXException
Writes the content of this widget to an XML content handler.

Parameters:
outputHandler - The handler to write this widget to.
Throws:
java.lang.NullPointerException - If the supplied content handler is null.
org.xml.sax.SAXException - If the writing of this widget fails.

writeWidget

public void writeWidget(java.io.OutputStream outputStream)
                 throws java.io.IOException,
                        java.lang.NullPointerException
Writes the content of this widget to a stream.

Parameters:
outputStream - The stream to write this widget to.
Throws:
java.io.IOException - If the writing of this widget fails.
java.lang.NullPointerException - If the supplied stream is null.

writeWidget

public void writeWidget(java.io.Writer writer)
                 throws java.io.IOException,
                        java.lang.NullPointerException
Writes the content of this widget to a stream.

Parameters:
writer - The stream to write this widget to.
Throws:
java.io.IOException - If the writing of this widget fails.
java.lang.NullPointerException - If the supplied writer is null.

writeAttribute

protected void writeAttribute(org.xml.sax.helpers.AttributesImpl attributes,
                              java.lang.String uri,
                              java.lang.String localName,
                              java.lang.String name,
                              java.lang.String type,
                              java.lang.String value)
                       throws java.lang.NullPointerException
Writes an attribute member of this widget to the supplied set.

Parameters:
attributes - The attribute set to write to.
uri - The URI of the attribute.
localName - The local name of the attribute.
name - The qualified name of the attribute.
type - The type of the attribute.
value - The value of the attribute.
Throws:
java.lang.NullPointerException - If the supplied attribute set is null.

writeChildren

protected void writeChildren(org.xml.sax.ContentHandler outputHandler,
                             Widget[] children)
                      throws java.lang.NullPointerException,
                             org.xml.sax.SAXException
Writes the specified array of Widgets to the supplied output handler.

Parameters:
outputHandler - The handler to write the widgets to.
children - The array of widgets to write.
Throws:
org.xml.sax.SAXException - If the writing of one of the specified widgets fails.
java.lang.NullPointerException - If the supplied content handler is null.

writeChildren

protected void writeChildren(org.xml.sax.ContentHandler outputHandler,
                             java.util.Collection children)
                      throws java.lang.NullPointerException,
                             org.xml.sax.SAXException
Writes the specified collection of Widgets to the supplied output handler.

Parameters:
outputHandler - The handler to write the widgets to.
children - The collection of widgets to write.
Throws:
org.xml.sax.SAXException - If the writing of one of the specified widgets fails.
java.lang.NullPointerException - If the supplied content handler is null.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object